package com.zbkj.crmeb.store.response;

import com.common.CommonPage;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Accessors(chain = true)
public class DataAnalysisResponse implements Serializable {

    @ApiModelProperty(value = "日期")
    private String years;

    @ApiModelProperty(value = "订单数")
    private Integer orderQuantity;

    @ApiModelProperty(value = "销售额")
    private BigDecimal sales;

    @ApiModelProperty(value = "收入")
    private BigDecimal income;

    @ApiModelProperty(value = "收入")
    private CommonPage<DataAnalysis> orderList;

    @Data
    @Accessors(chain = true)
    public static class DataAnalysis {

        @ApiModelProperty(value = "订单号")
        private String orderNumber;

        @ApiModelProperty(value = "创建时间")
        private Date createTime;

        @ApiModelProperty(value = "订单收入")
        private BigDecimal orderIncome;

        @ApiModelProperty(value = "格式日期 yyyy-MM",hidden = true)
        @JsonIgnore
        private String formatDate;

        @ApiModelProperty(value = "销售额",hidden = true)
        @JsonIgnore
        private BigDecimal orderSales;

    }

}